package com.ftg.learn.chapter04.domain;

import java.util.HashSet;

/**
 * pojo : 最简单的java类
 * @author 布衣
 */
public class Person {

    private String name;

    private int age;

    public Person(){}

    public Person(String name) {
        this.name = name;
    }

    //setter
    public void setName(String name) {
        if (name.length() >= 2 && name.length() <= 4) {
            this.name = name;
        }
    }

    //getter
    public String getName() {
        return name;
    }


}
